<?php

namespace Model;
use Think\Model;
//为sw_goods数据表创建一个Model模型类
//父类model：Think/library/think/model.class.php
class CodeModel extends Model{

    //记录时间，次数
    public function timesave($co_id){

        $info = $this->find($co_id);

        $info['co_time'] += 1;
        $info['last_time'] = NOW_TIME;

        $this->save($info);

    }

}